#pragma once

#include "msgObj.hpp"
#include "requestDevListMsgObj.hpp"

namespace Protocol {
class DevListNotifyMsgObject : public MsgObject {
public:
    DevListNotifyMsgObject(std::shared_ptr<MqttClient> m, std::shared_ptr<DeviceManager> d)
        : MsgObject(m, d) {}

    virtual bool parse(const std::string &topic, const std::string &payload) override { return true; }

    virtual MsgObject &action(void) override {
        _mqtt->publish("v1/dev/dev_dlt698/sdev_manager/list/get", nlohmann::json(RequestDevListMsgObject()).dump());
        return *this;
    }

    virtual bool reply(void) override { return true; }
};
};  // namespace Protocol
